package model

import (
	"gorm.io/gorm"
	"time"
)

type Hospital struct {
	Id           uint64         `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	HospitalName string         `gorm:"column:hospital_name;type:varchar(30);comment:机构名称;not null;" json:"hospital_name"` // 机构名称
	Address      string         `gorm:"column:address;type:varchar(30);comment:地址;not null;" json:"address"`               // 地址
	TeamId       uint64         `gorm:"column:team_id;type:bigint(20) UNSIGNED;comment:团队编号;not null;" json:"team_id"`     // 团队编号
	CreatedAt    time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt    time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt    gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}

func (h *Hospital) TableName() string {
	return "hospital"
}
